import request from "@/utils/request";

export function listFinancialProduct(params) {
  return request({
    url: "/financial-product",
    method: "get",
    params,
  });
}

export function listPageFinancialProduct(params) {
  return request({
    url: "/financial-product/page",
    method: "get",
    params,
  });
}

export function saveFinancialProduct(params) {
  return request({
    url: "/financial-product",
    method: "post",
    data: params,
  });
}

export function updateFinancialProduct(id,params) {
  return request({
    url: `/financial-product/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteFinancialProduct(id) {
  return request({
    url: `/financial-product/${id}`,
    method: "delete",
  });
}

export function deleteBatchFinancialProduct(idList) {
  return request({
    url: `/financial-product/batch`,
    method: "delete",
    data: idList,
  });
}

export function getFinancialProductById(id) {
  return request({
    url: `/financial-product/${id}`,
    method: "get",
  });
}
